import aphw._aphw as impl

class Key(object):
    def __init__(self, value=0, key=None):
        if key is not None:
            self._key = key
        else:
            self._key = impl.Key(value)

    value = property(lambda self: self._key.value)
    approximate_match_type = property(lambda self: self._key.approximate_match_type)
    
    def __str__(self):
        return 'APHW.Key(%s)' % self.value
